#include <stdio.h>
int main()
{
	int power = 0;
	scanf("%d",&power); 
	if(power<=150)
	{
		printf("%.1f",power*0.4463);
	}
	else if(power<=400)
	{
		power = power - 150;
		printf("%.1f",(150*0.4463)+(power*0.4663));
	}
	else{
		power = power - 400;
		printf("%.1f",(150*0.4463)+(250*0.4663)+(power*0.5663));
	}	
	
} 
